{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Download demo files from ModelScope Space"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "正克隆到 'ray-multi-agent'...\n",
      "remote: Enumerating objects: 695, done.\u001B[K\n",
      "remote: Counting objects: 100% (246/246), done.\u001B[K\n",
      "remote: Compressing objects: 100% (230/230), done.\u001B[K\n",
      "remote: Total 695 (delta 14), reused 215 (delta 13), pack-reused 449\u001B[K\n",
      "接收对象中: 100% (695/695), 11.91 MiB | 5.88 MiB/s, 完成.\n",
      "处理 delta 中: 100% (41/41), 完成.\n",
      "^C内容:  55% (5/9), 37.87 MiB | 1.44 MiB/s    \n",
      "warning: 克隆成功，但是检出失败。\n",
      "您可以通过 'git status' 检查哪些已被检出，然后使用命令\n",
      "'git checkout -f HEAD' 重试\n",
      "\n",
      "\n",
      "Exiting because of \"interrupt\" signal.\n"
     ]
    }
   ],
   "source": [
    "!git clone https://oauth2:BuVfBPqBwL1JEk7DRyCc@www.modelscope.cn/studios/wyj123456/ray-multi-agent.git"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Install dependencies and add your key"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!cd ray-multi-agent && pip install -r requirements.txt\n",
    "import os\n",
    "print('请输入DASHSCOPE_API_KEY')\n",
    "os.environ['DASHSCOPE_API_KEY'] = input()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Run app demo"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!cd modelscope_agent/multi_agents_utils\n",
    "!PYTHONPATH=../../ python multi_agent_videogen_ray.py"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "facechain",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
